Skip to main content

History Component Overview

In our system, the History component acts as the central access point for all user chat data, allowing users to efficiently navigate and manage past conversations.

What is the History Component?

The History component in the JeenAI platform is a robust chat management interface. It transforms a collection of raw chat sessions into a dynamic, user-friendly archive - enabling users to search, organize, and interact with their chat history through intelligent filtering, metadata management, and context-aware session loading.

Core Features

Search & Discovery

  • Real-time Search - Find conversations instantly by typing keywords or phrases
  • Smart Suggestions - Get search recommendations based on previous queries
  • Category Filtering - Filter conversations by custom categories and tags

Chat Session Management

  • Pin Important Chats - Keep frequently accessed conversations at the top
  • Rename Sessions - Give meaningful titles to your conversations for easy identification
  • Delete Conversations - Remove unwanted chat sessions permanently
  • Expand Details - View conversation history and multiple question versions

Organization & Navigation

  • Chronological Sorting - Conversations sorted by date with pinned items prioritized
  • Recent Chat Indicator - Clearly identify your most recent conversation
  • Category Management - Create, edit, and delete custom categories
  • Infinite Scrolling - Seamlessly load more conversations as you scroll

How It Works

  1. Load Your History - The component fetches your chat sessions from the server with pagination support
  2. Browse & Search - Use the search bar or category filters to find specific conversations
  3. Select a Conversation - Click on any chat to load its complete context and continue the discussion
  4. Manage Your Sessions - Use the 3-dots menu to rename, pin, categorize, or delete conversations
  5. Expand for Details - View conversation variants and timestamps for complex chat histories

API Endpoints

Chat Management

EndpointMethodPurpose
/api/v1/chats/get-history-chatsPUTFetch paginated list of user chat sessions with search and filter support
/api/v1/chats/{chatId}GETRetrieve detailed conversation data for a specific chat
/api/v1/chats/update-chat-idPOSTCreate or update chat session with title
/api/v1/chats/rename-chat-titlePUTUpdate the title of a specific chat session
/api/v1/chats/update-pinned-statusPUTToggle the pinned status of a conversation
/api/v1/chats/delete-chatPOSTPermanently remove a chat session from user history
/api/v1/chats/delete-chat-logsPOSTDelete all logs associated with a chat session

Category Management

EndpointMethodPurpose
/api/v1/chats/update-chat-categoriesPUTUpdate categories assigned to a specific chat
/api/v1/user/get-user-categoriesPUTFetch all user-defined categories
/api/v1/user/update-user-categoriesPUTCreate, update, or delete user categories

Search & Suggestions

EndpointMethodPurpose
/api/v1/logs/get-history-search-logsPUTRetrieve user's search history and suggestions
/api/v1/logs/save-history-search-logPOSTSave a new search query to user's history
/api/v1/logs/update-history-search-log-pinnedPUTPin or unpin a search suggestion
/api/user/get-search-suggestionsPUTGet search suggestions for autocomplete
/api/user/update-search-suggestionsPUTUpdate user's search suggestions

Legacy Support

EndpointMethodPurpose
/api/logs/get-logs-historyPUTFetch logs history with filtering (legacy)
/api/logsPOSTSave log as chat (legacy)